package router

import (
	"blog/control/appctl"

	"github.com/labstack/echo/v4"
)

// apiRouter 通用访问
func apiRouter(api *echo.Group) {
	api.GET("/article", appctl.ArticleGet)               // 文章获取
	api.GET("/article/page", appctl.ArticlePage)         // 文章分页
	api.POST("/article", appctl.ArticleAdd)              //新增文章
	api.PUT("/article/:id", appctl.ArticleUpdate)        // 更新文章
	api.PUT("/article/state", appctl.ArticleStateUpdate) // 更新文章状态
	api.GET("/file/upload-token", appctl.GetFiletUploadToken)
	api.POST("/file/upload", appctl.UploadFile276)
	api.GET("/common/base-info", appctl.BaseInfo)
	api.GET("/topic/list", appctl.GetTopicTree)
	api.GET("/article/archive", appctl.Archive)
	api.GET("/article/list", appctl.ArticleList)
}
